package com.ruoyi.epidemic.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.epidemic.mapper.TbProvinceMapper;
import com.ruoyi.epidemic.domain.TbProvince;
import com.ruoyi.epidemic.service.ITbProvinceService;

/**
 * 省份信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-03-21
 */
@Service
public class TbProvinceServiceImpl implements ITbProvinceService 
{
    @Autowired
    private TbProvinceMapper tbProvinceMapper;

    /**
     * 查询省份信息
     * 
     * @param id 省份信息主键
     * @return 省份信息
     */
    @Override
    public TbProvince selectTbProvinceById(Long id)
    {
        return tbProvinceMapper.selectTbProvinceById(id);
    }

    /**
     * 查询省份信息列表
     * 
     * @param tbProvince 省份信息
     * @return 省份信息
     */
    @Override
    public List<TbProvince> selectTbProvinceList(TbProvince tbProvince)
    {
        return tbProvinceMapper.selectTbProvinceList(tbProvince);
    }

    /**
     * 新增省份信息
     * 
     * @param tbProvince 省份信息
     * @return 结果
     */
    @Override
    public int insertTbProvince(TbProvince tbProvince)
    {
        tbProvince.setCreateTime(DateUtils.getNowDate());
        return tbProvinceMapper.insertTbProvince(tbProvince);
    }

    /**
     * 修改省份信息
     * 
     * @param tbProvince 省份信息
     * @return 结果
     */
    @Override
    public int updateTbProvince(TbProvince tbProvince)
    {
        return tbProvinceMapper.updateTbProvince(tbProvince);
    }

    /**
     * 批量删除省份信息
     * 
     * @param ids 需要删除的省份信息主键
     * @return 结果
     */
    @Override
    public int deleteTbProvinceByIds(Long[] ids)
    {
        return tbProvinceMapper.deleteTbProvinceByIds(ids);
    }

    /**
     * 删除省份信息信息
     * 
     * @param id 省份信息主键
     * @return 结果
     */
    @Override
    public int deleteTbProvinceById(Long id)
    {
        return tbProvinceMapper.deleteTbProvinceById(id);
    }
}
